package com.sqx.modules.reportBoss.controller;

import com.sqx.common.utils.Result;
import com.sqx.modules.app.annotation.Login;
import com.sqx.modules.reportBoss.entity.ReportBoss;
import com.sqx.modules.reportBoss.service.IReportBossService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 黑老板管理
 *
 * @author wuchang
 * @since 2023-07-25
 */
@RestController
@RequestMapping("/admin/reportBoss/")
@Api(value = "用户端-黑老板", tags = {"用户端-黑老板"})


public class AdminReportBossController {
    @Autowired
    private IReportBossService iReportBossService;

    /**
     * 新增黑老板
     */
    @ApiOperation("新增|修改黑老板")
    @PostMapping("insertReportBoss")
    public Result insertReportBoss( Long userId, ReportBoss reportBoss) {
        reportBoss.setUserId(userId);
        return iReportBossService.insertReportBoss(reportBoss);
    }


    @ApiOperation("删除黑老板")
    @PostMapping("deleteReportBoss")
    public Result deleteReportBoss(Long userId, Long reportId) {
        return iReportBossService.deleteReportBoss(userId, reportId);
    }

    @ApiOperation("获取黑老板列表")
    @GetMapping("getAdminReportBossList")
    public Result getReportBossList(Integer page, Integer limit, ReportBoss reportBoss) {
        return Result.success().put("data", iReportBossService.getReportBossList(page, limit, reportBoss));
    }
    @ApiOperation("审核举报黑老板")
    @PostMapping("examineReportBoss")
    public Result examineReportBoss(Long reportId,Integer examineStatus,String examineReason){
        return iReportBossService.examineReportBoss(reportId,examineStatus,examineReason);
    }
}

